<?php /*a:1:{s:63:"/Applications/MAMP/cloud/application/index/view/user/index.html";i:1598098067;}*/ ?>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>用户中心</title>
    <link rel="stylesheet" href="/static/index/assets/sui/dist/css/sm.css">
    <link rel="stylesheet" href="//at.alicdn.com/t/font_2008579_wi32sytndy.css">
    <link rel="stylesheet" href="/static/index/assets/css/index.css">
    <link rel="stylesheet" href="/static/index/assets/sui/dist/css/sm-extend.min.css">
</head>

<body>
    <!-- page 容器 -->
    <div class="page">
        <!-- 工具栏 -->
        <nav class="bar bar-tab">
            <a class="tab-item external" href="<?php echo url('index/index'); ?>">
                <span class="icon icon-home"></span>
                <span class="tab-label">首页</span>
            </a>
            <a class="tab-item external" href="<?php echo url('orderhall/index'); ?>">
                <span class="icon iconfont icondating"></span>
                <span class="tab-label">大厅</span>
            </a>
            <a class="tab-item external" href="<?php echo url('myorder/index'); ?>">
                <span class="icon iconfont icondingdan"></span>
                <span class="tab-label">订单</span>
            </a>
            <a class="tab-item external active" href="<?php echo url('user/index'); ?>">
                <span class="icon icon-me"></span>
                <span class="tab-label">我的</span>
            </a>
        </nav>
        <div class="content">
            <div class="user_head">
                <div class="user_head_l">
                    <img class="user_logo" src="<?php echo !empty($user['user_headimg']) ? htmlentities($user['user_headimg']) :  '/static/index/assets/image/user_default.png'; ?>" alt="">
                    <div class="user_nick">
                        <?php if(!$user): ?>
                        <span><a class="external" href="<?php echo url('login'); ?>">登录/注册</a></span>
                        <?php else: ?>
                        <span><?php echo htmlentities($user['user_nickname']); ?></span>
                        <div class="user_phone">
                            <?php if(!$user['user_phone']): ?>
                            <span></span>
                            <?php else: ?>
                            <span class="icon iconfont iconshouji"></span>
                            <span><?php echo htmlentities($user['user_phone']); ?></span>
                            <?php endif; ?>
                        </div>
                        <?php endif; ?>
                    </div>
                </div>
                <div class="user_head_r">
                    <img src="/static/index/assets/image/user_head.png" alt="">
                </div>
            </div>
            <?php if($user && !$user['user_name']): ?>
            <div class="user_notice">
                <a class="external" href="<?php echo url('saveusermsg'); ?>">完善资料才可以下单哦</a>
                <span class="icon iconfont iconguanbi pull-right"></span>
            </div>
            <?php endif; ?>

            <div class="user_not">
                <span>《每日一句》</span>
                <span id="notice"></span>
            </div>
            <div class="user_cont">
                <div class="list-block user_main">
                    <ul>
                        <?php if($user): if($user['user_status']==2): ?>
                                <li class="item-content">
                                    <div class="item-inner">
                                        <div class="item-title">
                                            <div class="user_cont_r">
                                                <img src="/static/index/assets/image/线性网课.png" alt="">
                                                <span>接单金额</span>
                                            </div>
                                        </div>
                                        <div class="item-after">
                                            <span class="">￥<?php echo htmlentities($user['user_money']); ?></span>
                                        </div>
                                    </div>
                                </li>
                            <?php endif; ?>
                        <?php endif; if($user): if($user['user_status']!=2): ?>
                              <li class="item-content" onclick="toSq()">
                                <div class="item-inner">
                                  <div class="item-title">
                                      <div class="user_cont_r">
                                        <img src="/static/index/assets/image/线性男学生.png" alt="">
                                        <span>成为送餐员</span>
                                      </div>
                                  </div>
                                  <div class="item-after">
                                      <span class="icon icon-right"></span>
                                  </div>
                                </div>
                              </li>
                            <?php endif; ?>
                        <?php endif; ?>
                      <li class="item-content" onclick="tel()">
                        <div class="item-inner">
                          <div class="item-title">
                              <div class="user_cont_r">
                                <img src="/static/index/assets/image/线性打印机.png" alt="">
                                <span>联系客服</span>
                              </div>
                          </div>
                          <div class="item-after">
                              <span class="icon icon-right"></span>
                          </div>
                        </div>
                      </li>
                      <li class="item-content" onclick="about()">
                        <div class="item-inner">
                          <div class="item-title">
                              <div class="user_cont_r">
                                <img src="/static/index/assets/image/线性老师.png" alt="">
                                <span>关于我们</span>
                              </div>
                            
                          </div>
                          <div class="item-after">
                              <span class="icon icon-right"></span>
                          </div>
                        </div>
                      </li>
                    </ul>
                  </div>
            </div>
        </div>

    </div>
    <script src='http://cdn.bootcss.com/jquery/3.1.1/jquery.min.js'></script>
    <script src='/static/index/assets/sui/dist/js/sm.js'></script>
    <script type='text/javascript' src='/static/index/assets/sui/dist/js/sm-extend.js' charset='utf-8'></script>
    <script>
        var i=0;
        var str="我希望有个如你一般的人，如山间清爽的风，如古城温暖的光，从清晨到夜晚，由山野到书房，等待 不怕岁月蹉跎，不怕路途遥远，只要最后  是你就好";
        window.onload=function typing(){
        var mydiv=document.getElementById("notice");
        mydiv.innerHTML+=str.charAt(i);
        i++;
        var id=setTimeout(typing,200);
        if(i==str.length){
            clearTimeout(id);
            }
        }
    </script>
    <script>
        function toSq() {
            $.confirm('确定要申请配送员吗?', function () {
                $.ajax({
                    url: "<?php echo url('user/tosq'); ?>",
                    type: "POST",
                    data: {},
                    dataType: "json",
                    success: function(data){
                        $.toast(data.msg, 2000);
                    }
                });
            });
        }
        function tel() {
            var modal = $.modal({
                title: '查看联系方式',
                text: '',
                afterText:  '<div  style="width: auto; margin:3px">'+
                    '<a style="height: 20px" href="tel:17599566047">17599566047</a>'+
                    '</div>',
                buttons: [
                    {
                        text: '确定'
                    },
                    {
                        text: '取消',
                        bold: true

                    },
                ]
            })
        }
        function about() {
            var us = $.modal({
                title: '关于我们',
                text: '',
                afterText:  '<div  style="width: auto; margin:3px">'+
                    '几个胸无大志顽皮的孩子'+
                    '</div>',
                buttons: [
                    {
                        text: '确定'
                    },
                    {
                        text: '取消',
                        bold: true

                    },
                ]
            })
        }
    </script>
</body>

</html>